package edu.sctu.practice.class02.hujie.online_classes_practice.imooc.Java_IO.class5to2;

import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;

/**
 * Created by hp on 2015/12/22.
 */
public class FrAndFwDemo {
    public static void main(String[] args) throws IOException {
        FileReader fr = new FileReader("F:\\桌面文件\\慕课网笔记\\文件传输基础IO流\\1.txt");
        FileWriter fw = new FileWriter("F:\\桌面文件\\慕课网笔记\\文件传输基础IO流\\1copy.txt", true);
        char[] buffer = new char[2056];
        int c;
        while ((c = fr.read(buffer, 0, buffer.length)) != -1) {
            fw.write(buffer, 0, c);
            fw.flush();
        }
        fr.close();
        fw.close();
    }
}
